﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using OpenNETCF.WindowsCE.Notification;

namespace LED_test
{
    public partial class Form1 : Form
    {
        int ledCount;
        Led led;

        const int USER0_LED = 0;
        const int USER1_LED = 1;
        const int USER2_LED = 2;
        const int USER3_LED = 3;

        public Form1()
        {
            InitializeComponent();
            this.Text = this.Text + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            led = new Led();
            ledCount = led.Count;
        }

        private void btnUSER0LED__ON_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER0_LED, Led.LedState.On);
        }

        private void btnUSER0LED_OFF_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER0_LED, Led.LedState.Off);
        }

        private void btnUSER0LED_BLINK_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER0_LED, Led.LedState.Blink);
        }

        private void btnUSER1LED_ON_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER1_LED, Led.LedState.On);
        }

        private void btnUSER1LED_OFF_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER1_LED, Led.LedState.Off);
        }

        private void btnUSER1LED_BLINK_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER1_LED, Led.LedState.Blink);
        }

        private void btnUSER2LED_ON_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER2_LED, Led.LedState.On);
        }

        private void btnUSER2LED_OFF_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER2_LED, Led.LedState.Off);
        }

        private void btnUSER2LED_BLINK_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER2_LED, Led.LedState.Blink);
        }

        private void btnUSER3LED_ON_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER3_LED, Led.LedState.On);
        }

        private void btnUSER3LED_OFF_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER3_LED, Led.LedState.Off);
        }

        private void btnUSER3LED_BLINK_Click(object sender, EventArgs e)
        {
            led.SetLedStatus(USER3_LED, Led.LedState.Blink);
        }

    }
}